package com.ys.controller.web.sys;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ys.service.sys.YsDictService;

/**
 * 
 * @author Jason
 *
 */
@Controller
@RequestMapping("/web/sys/ysDict")
public class WebYsDictController {
	
	@Autowired
	private YsDictService ysDictService;
	
	/*
	 * 调整顺序
	 */
	@GetMapping("/toResort")
	public String toResort(Model model, HttpServletRequest request, HttpServletResponse response,
			String dictKey){
		
		return ysDictService.toResort(model, dictKey);
	}
	
	/*
	 * 新增字典(选择框)
	 */
	@GetMapping("/toAdd")
	public String toAdd(Model model, HttpServletRequest request, HttpServletResponse response,
			String dictKey){
		return ysDictService.toAdd(model, dictKey);
	}
	
	/*
	 * 编辑字典(选择框)
	 */
	@GetMapping("/toEdit")
	public String toEdit(Model model, HttpServletRequest request, HttpServletResponse response,
			Long id){
		
		return ysDictService.toEdit(model, id);
	}
}
